<?php
class BaseModelLocalLog extends BaseModelLog {
    public static function write($msg, $type = LOG_WARNING) {
        $filename = LOGS_PATH . self::getType($type) . '.log';
        $output = date('Y-m-d H:i:s') . ' ' . ucfirst($type) . ': ' . $msg . "\n";
		$log = new File($filename, true);
		if ($log->writable()) {
			$log->append($output);
			return $log->close();
		}
		return false;
    }

    public static function read($type = LOG_WARNING) {
        
    }
    
    public static function truncate($type) {
        
    }
}